home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / HandHeldPCPro30 / sdk.exe / Jupiter SDK / data1.cab / MFC_Samples / helloapp / helloapp.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1999-02-19  |  1.4 KB  |  52 lines

  1. // helloapp.cpp : Minimal MFC Windows app.
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1999 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. #include <afxwin.h>
  14. #include "resource.h"
  15.  
  16. // Define a window class derived from CFrameWnd
  17. class CHelloWindow : public CFrameWnd
  18. {
  19. public:
  20.     // N.B. The caption is not shown
  21.     CHelloWindow()
  22.     { 
  23.         Create(NULL, CString((LPCTSTR)IDS_HELLO), WS_VISIBLE, rectDefault); 
  24.  
  25.         // For MFCCE 2.0 and earlier, a command bar was created during
  26.         // the CFrameWnd creation. For MFCCE 2.01 and later, a command bar 
  27.         // is automatically created for you during the call to AddAdornments().
  28.         AddAdornments(0); 
  29.  
  30.         InvalidateRect(NULL,TRUE);
  31.     }
  32. };
  33.  
  34. // Define an application class derived from CWinApp
  35. class CHelloApp : public CWinApp
  36. {
  37. public:
  38.     virtual BOOL InitInstance();
  39. };
  40.  
  41. // Construct the CHelloApp's m_pMainWnd data member
  42. BOOL CHelloApp::InitInstance()
  43. {
  44.     m_pMainWnd = new CHelloWindow();
  45.     m_pMainWnd->ShowWindow(m_nCmdShow);
  46.     m_pMainWnd->UpdateWindow();
  47.     return TRUE;
  48. }
  49.  
  50. // HelloApp's constructor initializes and runs the app
  51. CHelloApp HelloApp;
  52.